def searchInsert(nums: [int], target: int) -> int:
    left = 0
    size = len(nums)
    if size == 0:
        return 0
    right = size
    while left < right:
        mid = left + (right - left) // 2
        if(nums[mid] < target):
            left = mid + 1
        else:
            assert nums[mid] >= target
            right = mid


    return left


a = searchInsert([1,2,3,4,5,6,7], 6)
print(a)